<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />                   
<title>后台管理 -- Talking</title>
<link rel="stylesheet" href="./static/css/frame.css" />
<script src="./static/js/jquery-1.3.min.js"></script> 
<script>
$(document).ready(function(){
    $('#addIP').click(function(){
        $('.list tr:last').before("<tr>"+
        "<td></td>"+
        "<td><input type='text' style='width:90%;' name='ipAddr[ ]' /></td>"+
        "<td></td>"+
        "<td><input type='text' style='width:90%;' name='ipAlert[ ]' value='您的IP已禁止' /></td>"+
        "<td></td>"+
        "</tr>");
        if($('body').height()>=500){
            top.resizeFrame();
        }
    });
    $('#chkDel').click(function(){
        if($(this).attr('checked')==true){
            $('input[type=checkbox]').each(function(i){
                $(this).attr('checked','checked');
            });
        }
        else{
            $('input[type=checkbox]').each(function(i){
                $(this).removeAttr('checked');
            });
        }
    });
});
</script>
</head>

<body>
<div id="content">
    <div class="title">用户 » IP过滤</div>
    <div class="main">
        <h3>IP过滤</h3> 
        <form action="ip_filter.php" name="form" method="post"> 
        <table cellpadding="0" cellspacing="0" class="list">
            <tbody>
                <tr>
                    <td width="30" align="center">删除</td>
                    <td width="120">IP地址</td>
                    <td width="250">地理位置</td>
                    <td>提示语</td>
                    <td width="90" align="center">操作者</td>
                </tr>
                {{section name=n loop=$ipfilters}}
                <tr>
                    <td align="center">
                        <input type="checkbox" name="del[ ]" value="{{$ipfilters[n].IPID}}" />
                    </td>
                    <td>{{$ipfilters[n].IPAddr}}</td>
                    <td>{{$ipfilters[n].IPPosition}}</td>
                    <td>{{$ipfilters[n].IPAlert}}</td>
                    <td align="center"><a href="/user.php?id={{$ipfilters[n].IPManager}}" target="_blank">{{$ipfilters[n].UserName}}</a></td>
                </tr>
                {{/section}}
                <tr>                                                               
                    <td align="center"><input type="checkbox" id="chkDel" /></td>
                    <td colspan="4">
                        <a href="javascript:void(0)" id="addIP">添加IP地址</a>
                    </td>
                </tr>
            </tbody>
        </table>
        <p>
            <input type="submit" class="button_submit" name="submit" value="提交" />
            <span>{{$tip}}</span>
        </p> 
        </form>  
    </div>
</div>
</body>
</html>
